<%-- 
    Document   : urediProfil
    Created on : 28.6.2011, 21:50:23
    Author     : tincek
--%>

<%@page import="gandalf.model.Stranka"%>
<%@page import="gandalf.controller.StrankaJpaController"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
         <link rel="stylesheet" href="css/style.css" type="text/css" media="screen, projection">
        <link rel="stylesheet" href="blueprint/src/forms.css" type="text/css" media="screen, projection">
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
        <script type="text/javascript" src="javascript/script.js"></script>
    </head>
    <%
                //DogodekDao dogodekDao = new DogodekDao();
                //CartJpaController cartDao = new CartJpaController();
                StrankaJpaController strankaDao = new StrankaJpaController();

                Long idStranke = (Long) request.getSession().getAttribute("stranka_id");

                Stranka stranka = null;
                if (idStranke != null) {
                    stranka = strankaDao.findStrankaWithNakupi(idStranke);
                }
    %>
    <body>
        <div id="header">
            <h1 id="logo">Gandalf</h1>

        </div><!-- header -->
        <div id="section" class="container">
            <div id="registracija">
                <form id="registracija" action="Registracija" method="POST">
                    <fieldset>
                        <legend>Urejanje podatkov</legend>

                        <ul>
                            <li>
                                <label for="ime">Ime</label><br>
                                <input name="ime" type="text" value="<%=stranka.getIme()%>" />
                            </li>
                            <li>
                                <label for="priimek">Priimek</label><br>
                                <input name="priimek" type="text" value="<%=stranka.getPriimek()%>"/>
                            </li>
                            <li>
                                <label for="naslov">Naslov</label><br>
                                <input name="naslov" type="text" value="<%=stranka.getNaslov()%>"/>
                            </li>
                            <li>
                                <label for="kraj">Kraj</label><br>
                                <input name="kraj" type="text" value="<%=stranka.getKraj()%>"/>
                            </li>
                            <li>
                                <label for="email">E-mail</label><br>
                                <input name="email" type="text" value="<%=stranka.getEmail()%>" />
                            </li>
                            <li>
                                <label for="password">Geslo</label><br>
                                <input name="password" type="password" value="<%=stranka.getPassword()%>"/>
                            </li>
                            <li>
                                <label for="narocen">Naročen na novice</label><br>
                                <input type="checkbox" name="narocen" value="<%=stranka.isNarocen()%>"
                                       <%if (stranka.isNarocen()) {
                                                       out.println("checked");
                                                   }%>/>
                            </li>

                            <input name="submit" value="Potrdi" type="submit" />

                        </ul>
                    </fieldset>
                </form>
            </div>





        </div>
    </body>
</html>
